# -*- coding: utf-8 -*-
#
# File: Profissional.py
#
# Copyright (c) 2008 by TcheZope.org
# Generator: ArchGenXML Version 2.0-beta9
#            http://plone.org/products/archgenxml
#
# GNU General Public License (GPL)
#

__author__ = """Fabiano Weimar dos Santos <xiru@xiru.org>, Jean Rodrigo Ferri
<jeanrodrigoferri@yahoogroups.com>, Rafahela Bazzanella
<rafabazzanella@yahoo.com.br>"""
__docformat__ = 'plaintext'

from AccessControl import ClassSecurityInfo
from Products.Archetypes.atapi import *
from zope.interface import implements
import interfaces
from Products.PloneZopista.Perfil import Perfil
from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin

from Products.PloneZopista.config import *

##code-section module-header #fill in your manual code here
##/code-section module-header

schema = Schema((

    StringField(
        name='sexo',
        widget=SelectionWidget,
        enforceVocabulary=1,
        vocabulary=VOCAB_SEXOS,
        required=1,
    ),
    DateTimeField(
        name='nascimento',
        widget=DateTimeField._properties['widget'](
            description="Informe a data do seu nascimento.",
            format='%d/%m/%Y',
            date_only=1,
            label='Nascimento',
            label_msgid='PloneZopista_label_nascimento',
            description_msgid='PloneZopista_help_nascimento',
            i18n_domain='PloneZopista',
        ),
    ),
    StringField(
        name='hobbie',
        widget=StringField._properties['widget'](
            description="Informe seu(s) hobbie(s).",
            label='Hobbie',
            label_msgid='PloneZopista_label_hobbie',
            description_msgid='PloneZopista_help_hobbie',
            i18n_domain='PloneZopista',
        ),
    ),
    ImageField(
        name='foto',
        allowable_content_types=('image/*',),
        widget=ImageField._properties['widget'](
            description="Selecione uma fotografia sua. Tenha cuidado com tamanho e resolucao dessa imagem.",
            label='Foto',
            label_msgid='PloneZopista_label_foto',
            description_msgid='PloneZopista_help_foto',
            i18n_domain='PloneZopista',
        ),
        default_output_tipe="image/jpeg",
        storage=AttributeStorage(),
        original_size=(100,75),
    ),
    TextField(
        name='idiomas',
        widget=TextAreaWidget(
            description="Informe os idiomas que conhece e o grau de conhecimento desses idiomas.",
            rows=3,
            label='Idiomas',
            label_msgid='PloneZopista_label_idiomas',
            description_msgid='PloneZopista_help_idiomas',
            i18n_domain='PloneZopista',
        ),
    ),
    TextField(
        name='formacao',
        widget=TextAreaWidget(
            description="Informe sua formacao.",
            rows=5,
            label='Formacao',
            label_msgid='PloneZopista_label_formacao',
            description_msgid='PloneZopista_help_formacao',
            i18n_domain='PloneZopista',
        ),
    ),
    TextField(
        name='experiencias',
        widget=RichWidget(
            description="Informe suas experiencias com as tecnologias Python/Zope/Plone e afins.",
            label='Experiencias',
            label_msgid='PloneZopista_label_experiencias',
            description_msgid='PloneZopista_help_experiencias',
            i18n_domain='PloneZopista',
        ),
        required=1,
        searchable=1,
    ),
),
)

##code-section after-local-schema #fill in your manual code here
##/code-section after-local-schema

Profissional_schema = BaseSchema.copy() + \
    getattr(Perfil, 'schema', Schema(())).copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
##/code-section after-schema

class Profissional(Perfil, BaseContent, BrowserDefaultMixin):
    """
    """
    security = ClassSecurityInfo()
    implements(interfaces.IProfissional)

    meta_type = 'Profissional'
    _at_rename_after_creation = True

    schema = Profissional_schema

    ##code-section class-header #fill in your manual code here
    ##/code-section class-header

    # Methods


registerType(Profissional, PROJECTNAME)
# end of class Profissional

##code-section module-footer #fill in your manual code here
##/code-section module-footer



